package ru.linnenson.darshana.infrastructure.services.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import ru.linnenson.darshana.infrastructure.persistence.models.DictionaryStore;
import ru.linnenson.darshana.infrastructure.persistence.models.LevelStore;
import ru.linnenson.darshana.infrastructure.persistence.models.NumberInKimStore;
import ru.linnenson.darshana.infrastructure.persistence.models.SourceStore;
import ru.linnenson.darshana.infrastructure.persistence.models.ThemeStore;
import ru.linnenson.darshana.infrastructure.rest.dto.DictionaryDto;
import ru.linnenson.darshana.infrastructure.rest.dto.TagDto;
import java.util.List;

@Mapper(componentModel = "spring")
public interface DictionaryDtoMapper {

  DictionaryDto toDto(DictionaryStore store);

  List<DictionaryDto> toSourceDto(List<SourceStore> source);
  
  List<DictionaryDto> toLevelDto(List<LevelStore> source);

  List<DictionaryDto> toThemeDto(List<ThemeStore> source);

  List<DictionaryDto> toNumberInKimDto(List<NumberInKimStore> source);

  @Mapping(target = "id", source = "tag")
  @Mapping(target = "name", source = "tag")
  TagDto toTagsDto(String tag);

  List<TagDto> toTagsDto(List<String> tags);
}
